import type { Drawing } from './drawing';
import type { User } from './auth';

// 投票接口
export interface Vote {
  id: number;
  drawing: Drawing;
  user: User;
  createdAt: string;
  updatedAt: string;
}

// API 响应数据
export interface VoteResponse {
  data: Vote;
  meta?: any;
}

export interface VotesResponse {
  data: Vote[];
  meta: {
    pagination: {
      page: number;
      pageSize: number;
      pageCount: number;
      total: number;
    };
  };
}

// 排行榜项目
export interface LeaderboardItem {
  drawingId: number;
  title: string;
  imageData: string;
  drawingType: 'bird' | 'fish' | 'boat';
  username: string;
  voteCount: number;
  rank: number;
}

// 排行榜时间段（新增：all 总榜）
export type LeaderboardPeriod = 'daily' | 'weekly' | 'monthly' | 'all';